/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package bs.stock.modelo;

import java.io.Serializable;
import javax.persistence.Embeddable;

/**
 *
 * @author ctrosch
 */
@Embeddable
public class StockPK implements Serializable {

    private String artcod;
    private String nserie;
    private String envase;
    private String ndespa;
    private String notros;
    private String nfecha;
    private String natrib;
    private String nubica;
    private String nestan;
    private String deposito;


    public StockPK() {

    }

    public StockPK(String artcod, String nserie, String envase, String ndespa, String notros, String nfecha, String natrib, String nubica, String nestan, String deposi) {
        
        this.artcod = artcod;
        this.nserie = nserie;
        this.envase = envase;
        this.ndespa = ndespa;
        this.notros = notros;
        this.nfecha = nfecha;
        this.natrib = natrib;
        this.nubica = nubica;
        this.nestan = nestan;
        this.deposito = deposi;
        
    }

    public String getCodigo() {
        return artcod;
    }

    public void setArtcod(String artcod) {
        this.artcod = artcod;
    }

    public String getDeposito() {
        return deposito;
    }

    public void setDeposito(String deposi) {
        this.deposito = deposi;
    }

    public String getEnvase() {
        return envase;
    }

    public void setEnvase(String envase) {
        this.envase = envase;
    }

    public String getNatrib() {
        return natrib;
    }

    public void setNatrib(String natrib) {
        this.natrib = natrib;
    }

    public String getNdespa() {
        return ndespa;
    }

    public void setNdespa(String ndespa) {
        this.ndespa = ndespa;
    }

    public String getNestan() {
        return nestan;
    }

    public void setNestan(String nestan) {
        this.nestan = nestan;
    }

    public String getNfecha() {
        return nfecha;
    }

    public void setNfecha(String nfecha) {
        this.nfecha = nfecha;
    }

    public String getNotros() {
        return notros;
    }

    public void setNotros(String notros) {
        this.notros = notros;
    }

    public String getNserie() {
        return nserie;
    }

    public void setNserie(String nserie) {
        this.nserie = nserie;
    }

    public String getNubica() {
        return nubica;
    }

    public void setNubica(String nubica) {
        this.nubica = nubica;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final StockPK other = (StockPK) obj;
        
        if ((this.artcod == null) ? (other.artcod != null) : !this.artcod.equals(other.artcod)) {
            return false;
        }
        if ((this.nserie == null) ? (other.nserie != null) : !this.nserie.equals(other.nserie)) {
            return false;
        }
        if ((this.envase == null) ? (other.envase != null) : !this.envase.equals(other.envase)) {
            return false;
        }
        if ((this.ndespa == null) ? (other.ndespa != null) : !this.ndespa.equals(other.ndespa)) {
            return false;
        }
        if ((this.notros == null) ? (other.notros != null) : !this.notros.equals(other.notros)) {
            return false;
        }
        if ((this.nfecha == null) ? (other.nfecha != null) : !this.nfecha.equals(other.nfecha)) {
            return false;
        }
        if ((this.natrib == null) ? (other.natrib != null) : !this.natrib.equals(other.natrib)) {
            return false;
        }
        if ((this.nubica == null) ? (other.nubica != null) : !this.nubica.equals(other.nubica)) {
            return false;
        }
        if ((this.nestan == null) ? (other.nestan != null) : !this.nestan.equals(other.nestan)) {
            return false;
        }
        if ((this.deposito == null) ? (other.deposito != null) : !this.deposito.equals(other.deposito)) {
            return false;
        }
       
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 7;        
        hash = 59 * hash + (this.artcod != null ? this.artcod.hashCode() : 0);
        hash = 59 * hash + (this.nserie != null ? this.nserie.hashCode() : 0);
        hash = 59 * hash + (this.envase != null ? this.envase.hashCode() : 0);
        hash = 59 * hash + (this.ndespa != null ? this.ndespa.hashCode() : 0);
        hash = 59 * hash + (this.notros != null ? this.notros.hashCode() : 0);
        hash = 59 * hash + (this.nfecha != null ? this.nfecha.hashCode() : 0);
        hash = 59 * hash + (this.natrib != null ? this.natrib.hashCode() : 0);
        hash = 59 * hash + (this.nubica != null ? this.nubica.hashCode() : 0);
        hash = 59 * hash + (this.nestan != null ? this.nestan.hashCode() : 0);
        hash = 59 * hash + (this.deposito != null ? this.deposito.hashCode() : 0);
        
        return hash;
    }

    @Override
    public String toString() {
        return "StockPK{" + "artcod=" + artcod + "nserie=" + nserie + "envase=" + envase + "ndespa=" + ndespa + "notros=" + notros + "nfecha=" + nfecha + "natrib=" + natrib + "nubica=" + nubica + "nestan=" + nestan + "deposi=" + deposito +  '}';
    }

}
